import numpy as np

arr1 = np.array([4, 8, 4, 2])
# 开方
print(np.sqrt(arr1))
# 取绝对值
arr2 = np.array([-1, 2, -10, -2])
print(np.abs(arr2))
# 求平方
print(np.square(arr2))
# 计算arr1和arr2的和
print(np.add(arr1, arr2))
# 计算两个数组的乘积
print(np.multiply(arr1, arr2))
# 多个数组取最大值
print(np.maximum(arr1, arr2))
# 执行元素级的比较操作
print(np.greater(arr1, arr2))
print(np.less(arr1, arr2))
